﻿using System.Reflection;
using System.Configuration;

namespace AbstractFactory
{
    class DataAccess
    {
        private static readonly string db = ConfigurationManager.AppSettings["DB"];
        private static readonly string AssemblyName = "AbstractFactory";

        public static IUser CreateUser()
        {
            return Assembly.Load(AssemblyName).CreateInstance(AssemblyName + ".User" + db) as IUser;
        }

    }
}
